# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=nautilus
pkgver=42.0
pkgrel=0
pkgdesc="GNOME file manager"
url="https://wiki.gnome.org/Apps/Nautilus"
# s390x and riscv64 blocked by librsvg
arch="all !s390x !riscv64"
license="GPL-2.0-or-later"
depends="tracker-miners gsettings-desktop-schemas"
depends_dev="gnome-desktop-dev gnome-autoar-dev"
makedepends="
	$depends_dev
	docbook-xml
	docbook-xsl
	gexiv2-dev
	gst-plugins-base-dev
	intltool
	itstool
	jpeg-dev
	libexif-dev
	libhandy1-dev
	libportal-dev
	librsvg-dev
	libseccomp-dev
	libxml2-dev
	libxml2-utils
	libxslt
	meson
	tiff-dev
	tracker-dev
	tracker-testutils
	"
checkdepends="desktop-file-utils appstream-glib"
subpackages="$pkgname-dev $pkgname-lang"
source="https://download.gnome.org/sources/nautilus/${pkgver%.*}/nautilus-$pkgver.tar.xz
	meson-fix-mixed-list.patch
	"

if [ "$CARCH" = "armhf" ]; then
	options="!check" # one test fails on armhf
fi

# secfixes:
#   3.32.1-r0:
#     - CVE-2019-11461

build() {
	abuild-meson \
		-Dtests=headless \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
c3b182f75f89a31ecb7b4f6b42dfb2f9792e195fdaf0e5f2b1a4dbe0f0d01071cf4ecb8408d6da476aa111ec891462e33c0d139d3423109bd5b4138ae822bd1e  nautilus-42.0.tar.xz
d08c6833343b8ed89515d12063938e7236cb37d15b7115de50a43bd9a049a09a5a2fc907f52675ba85abecef9bae82c7848249872908eeb39c5c49a744cbf9d1  meson-fix-mixed-list.patch
"
